package Linux五种IO模型.reactor2;

import java.io.IOException;
import java.nio.channels.SelectionKey;
import java.nio.channels.SocketChannel;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * @author coderFu
 * @create 2022/3/8
 */
public interface HandlerState {

    /**
     * 改变 客户端管道的状态 是 读取和写入状态
     * @param h
     */
    void changeState(HandlerDemo2 h);

    /**
     * 处理 客户端读写数据的多线程处理方法
     * @param h
     * @param sk
     * @param sc
     * @param pool
     */
    void handle(HandlerDemo2 h, SelectionKey sk, SocketChannel sc, ThreadPoolExecutor pool) throws IOException;
}
